//
// Created by liugd on 24-7-19.
//

#ifndef ACCOUNT_ITEM_H
#define ACCOUNT_ITEM_H

#endif //ACCOUNT_ITEM_H
#include "common.h"

struct AccountItem {
    string itemType;
    double amount;
    string detail;
};

//账目操作函数
//1、记账
void accounting(vector<AccountItem>& items);
//2、查询
void query(const vector<AccountItem>& items);
void queryItems(const vector<AccountItem>& items, const string itemType);
void queryItems(const vector<AccountItem>& items);

void income(vector<AccountItem>& items);
void expand(vector<AccountItem>& items);
void insertDataToFile(AccountItem& item);

//加载账目
void loadDataFormFile(vector<AccountItem>& items);


